package com.lanqiao.companymanage.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanqiao.companymanage.entity.AssetInformation;
import com.lanqiao.companymanage.service.CompanyAssetsService;
import com.lanqiao.companymanage.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author 何小棍
 * 公司资产查询
 */
@RestController
@RequestMapping("/companyAssets")
@Api(tags = "公司资产管理")
public class CompanyAssetsController {

    @Autowired
    CompanyAssetsService companyAssetsService;

    /**
     * 公司资产分页查询
     * @param assetMessPage
     * @return
     */
    @GetMapping("/getCompanyAssetsPage")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", value = "当前页数,默认第一页"),
            @ApiImplicitParam(name = "size", value = "每页显示条数，默认 10")})
    @ApiOperation(value = "公司资产分页查询")
    public Result getCompanyAssetsPage(Page<AssetInformation> assetMessPage){
        Page<AssetInformation> list =  companyAssetsService.getCompanyAssetsPage(assetMessPage);
        return Result.success(list);
    }


}
